﻿using WMLogistics.Model;
using WMLogistics_Dao;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Dapper;
using DapperExtensions;
using Logistics.Utility;

namespace WMLogistics.Service
{
    public class BidWLPriceService
    {
        private BidWLPriceDao dao = new BidWLPriceDao();

        public IEnumerable<wuliu_bid_wlcompany> GetPriceList(int bid_id)
        {
            return dao.GetPriceList(bid_id);
        }
        /// <summary>
        /// 重新选标列表
        /// </summary>
        /// <param name="bid_id"></param>
        /// <returns></returns>
        public IEnumerable<wuliu_bid_wlcompany> GetRePriceList(int bid_id)
        {
            return dao.GetRePriceList(bid_id);
        }

        /// <summary>
        /// 获取标单价格列表
        /// </summary>
        /// <param name="bid_id"></param>
        /// <returns></returns>
        public IEnumerable<wuliu_bid_wlcompany> GetBillPriceList(int bid_id)
        {
            return dao.GetBillPriceList(bid_id);
        }
        
        /// <summary>
        /// 第一次选中
        /// </summary>
        /// <param name="bid_id"></param>
        /// <param name="bid_wl_id"></param>
        /// <param name="load"></param>
        /// <returns></returns>
        public bool ChoiceBidPirce(int bid_id,int bid_wl_id,wuliu_bid_wlcompany picemod,wuliu_bid_load load)
        {
            return dao.ChoiceBidPrice(bid_id, bid_wl_id,picemod,load);
        }
        /// <summary>
        /// 重新选标操作
        /// </summary>
        /// <param name="bid_id"></param>
        /// <param name="bid_wl_id"></param>
        /// <param name="load"></param>
        /// <returns></returns>
        public bool ChoiceReBidPirce(int bid_id, int bid_wl_id, wuliu_bid_wlcompany picemod, wuliu_bid_load load)
        {
            return dao.ChoiceReBidPrice(bid_id, bid_wl_id, picemod, load);
        }

        public bool UpLoadSate(string loadno)
        {
            return dao.UpLoadSate(loadno);
        }
        public bool NotPickUp(int bid_id)
        {
            return dao.NotPickUp(bid_id);
        }

        public wuliu_bid_wlcompany GetPriceBidByWuliuId(string billNo,int wuliu_id)
        {
            return dao.GetByWuLiuId(billNo, wuliu_id);
        }

        public wuliu_bid_wlcompany GetPriceBid(int price_id)
        {
            return dao.Get(price_id);
        }


        
       
    }
}
